
#include "../bsp/beep/bsp_beep.h"
#include "../bsp/clk/bsp_clk.h"
#include "../bsp/delay/bsp_delay.h"
#include "../bsp/epit/bsp_epit.h"
#include "../bsp/epittimer/bsp_epittimer.h"
#include "../bsp/gpt/bsp_gpt.h"
#include "../bsp/int/bsp_int.h"
#include "../bsp/led/bsp_led.h"

void EPIT2_HANDLER();
/*
 * @description	: main函数
 * @param 		: 无
 * @return 		: 无
 */
int main(void) {

  int_init();      /* 初始化中断(一定要最先调用！) */
  imx6u_clkinit(); /* 初始化系统时钟 			*/
  clk_enable();    /* 使能所有的时钟 			*/
  led_init();      /* 初始化led 			*/
  beep_init();

  unsigned char state = OFF;
  int i = 0;
  while (1) {
    for (i = 15; i < 500; i++) {
      state = !state;
      beep_switch(state);
      delay_ms(i);
    }
    for (i = 500; i > 15; i--) {
      state = !state;
      beep_switch(state);
      delay_ms(i);
    }
  }

  return 0;
}